<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加会员</title>
    <link rel="stylesheet" href="../../style/brand/detailsBrand.css">
    <link rel="stylesheet" href="../../libs/bootstrap-5.3.0-alpha1-dist/css/bootstrap.css">
    <script src="../../libs/bootstrap-5.3.0-alpha1-dist/js/bootstrap.bundle.js"></script>
    <script src="../../js/vue-2.6.12.js"></script>
    <script src="../../js/axios-0.21.0.js"></script>
    <script src="../../js/qs-6.9.4.js"></script>
    <script src="../../js/vue-router-3.4.9.js"></script>
</head>

<body>

    <div class="containers" id="app">
        <h3 align="center">商品</h3>
        <hr>
        <div class="container-basic">
            <table class="table table-bordered">
                <thead>
                    <tr>
                        <th colspan="4">商品详情</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>商品名</td>
                        <td>{{good.goodsName}}</td>
                        <td>库存</td>
                        <td>{{good.stock}}</td>
                    </tr>
                    <tr>
                        <td>进货价</td>
                        <td>{{good.costPrice}}</td>
                        <td>单价</td>
                        <td>{{good.retailPrice}}</td>
                    </tr>
                    <tr>
                        <td>类别</td>
                        <td>{{good.categoryId}}</td>
                        <td>上架时间</td>
                        <td>{{good.listTime}}</td>
                    </tr>
                    <tr>
                        <td>折扣</td>
                        <td>{{good.discount}}</td>
                        <td>状态</td>
                        <td>{{good.status}}</td>
                    </tr>
                    <tr>
                        <td>商品介绍</td>
                        <td colspan="3">
                            <textarea style="resize: none;" class="form-control" id="exampleFormControlTextarea1"
                                rows="3" readonly="readonly"v-model="good.introduction"></textarea>
                        </td>
                    </tr>
                <tr>
                    <td><a href="../../views/brand/index.html"  type="button" class="btn btn-success" align="center" >返回商品列表</a></tr></td>
                </tbody>
            </table>
        </div>
    </div>
    <script>
        const currentUrl = window.location.href;
        const goodsId = currentUrl.split("=")[1];

        const app = new Vue({
            el: "#app",
            data: {
                good:{}
            },
            methods: {
            },
            created() {
                axios.get("/shop/goods/detailGood?goodsId=" + goodsId).then(res => {
                    this.good=res.data
                })

                }


        })
    </script>
</body>

</html>